home *** CD-ROM | disk | FTP | other *** search
/ CD School House 9 / CD School House 9.0 - Wayzata Technology (1994).iso / pc / dos / teachaid / pccai / caiarc1.exe / PDDEMO.CAI < prev    next >
Text File  |  1993-12-06  |  10KB  |  406 lines

  1. .rem                                                                 
  2. .rem -----------------PRESS CTRL-G (Go) TO RUN THIS PROGRAM--------- 
  3. .rem                                                                 
  4. .screen 0
  5. .col 11,0
  6. .rem l.cyan on black
  7. .cls
  8. .col 2
  9. .rem green
  10. .cen(*THE POTENTIAL DIVIDER CIRCUIT*)
  11. .col 11
  12. .skip 5
  13. This demo is part of a tutorial written
  14. to explain potential divider theory
  15. to electronics students (16 - 18 year olds).
  16.  
  17. It shows how to use .img files to create a circuit diagram,
  18. and to make a resistor grow in size!
  19.  
  20.  
  21. .col 9
  22. Contact Martin Rice,  Newbury College of Further Education,
  23.         Oxford Road, Newbury, Berkshire, RG13 1PQ, England
  24.  
  25.         for details of other .cai tutorials.
  26. .locate 23,1
  27. .col 2
  28. .pause(*Press any key to continue...*)
  29. .screen 2
  30. .cls
  31. .get lh.img
  32. .put 120,22
  33. .put 120,79
  34. .get rv.img
  35. .put 126,23
  36. .put 126,55
  37. .get lv.img
  38. .put 126,47
  39. .locate 14,1
  40. Let's do another, still with easy numbers, but this time the top resistor
  41. is 10k, and the bottom one is 5k. The voltage at the top is now +12V.
  42.  
  43. The process will again be:
  44. calculate the current flowing by taking into account the total resistance,
  45. then compute the voltage drop across the bottom resistor.
  46.  
  47. .locate 5,19
  48. 10K
  49. .locate 9,19
  50. 5K
  51. .locate 2,15
  52. +12V
  53. .locate 12,16
  54. 0V
  55. .locate 23,1
  56. .pause(*Press any key to continue*)
  57. .rem*****************************************************************
  58. .locate 23,1
  59. .blank 1
  60. @BEGIN QUESTION nocount
  61. .locate 14,1
  62. .blank 9
  63. .locate 14,1
  64. @TRIES  2
  65. What is the value of the current flowing through the circuit?
  66.  
  67. @READ (*Please enter your answer here: *)
  68. @RIGHT (*0.8mA*) Exact nocase
  69. Good.
  70. @RIGHT (*.8mA*) Exact nocase
  71. Good.
  72. @WRONG
  73.  
  74. Remember to calculate the total resistance, then use Ohm's Law.
  75. Give the answer in mA, eg 1.2mA
  76.  
  77. .pause(*press any key to have another go*)
  78. @WRONG FINAL
  79. .locate 16,1
  80. .blank 7
  81. .locate 16,1
  82. (You've had two tries at the answer.)
  83.  
  84. The correct answer is 0.8mA: 12V/15K = 0.8mA
  85. @END QUESTION
  86. .get vd.img
  87. .put 126,47
  88. .locate 7,11
  89. 0.8mA
  90. .locate 23,1
  91. .pause(*Press any key to continue*)
  92. .rem*************************************************************
  93. .locate 23,1
  94. .blank 1
  95. @BEGIN QUESTION nocount
  96. @TRIES 2
  97. .locate 14,1
  98. .blank 9
  99. .locate 14,1
  100. Now calculate the voltage at the junction of the two resistors
  101.  
  102. @READ(*Please enter your answer here: *)
  103. @RIGHT (*4v*) Exact nocase
  104.  
  105. Very good.
  106.  
  107. .pause(*Press any key to continue*)
  108. @RIGHT (*4.0V*) Exact nocase
  109.  
  110. Very good.
  111.  
  112. .pause(*Press any key to continue*)
  113. @WRONG (*8*) DECIMAL
  114.  
  115. Close! Your answer (8V) is the volt drop across the top resistor,
  116. but we're interested in what's left across the bottom one!
  117.  
  118. .pause(*press any key to have another go*)
  119. @WRONG
  120.  
  121. Use V = I*R to get the volt drop across the bottom resistor.
  122.  
  123. .pause(*press any key for another try*)
  124. @WRONG FINAL
  125.  
  126. .locate 16,1
  127. .blank 7
  128. .locate 16,1
  129. (You've given two wrong answers)
  130.  
  131. The correct answer is 4.0V: 0.8mA * 5k = 4.0V
  132.  
  133. .pause(*Press any key to continue*)
  134. @END QUESTION
  135. .locate 7,19
  136. +4.0V
  137. .locate 5,25
  138. 8V
  139. .locate 9,25
  140. 4V
  141. .get up-arrow.img
  142. .put 192,22
  143. .put 192,51
  144. .get down-arr.img
  145. .put 192,43
  146. .put 192,72
  147. .locate 14,1
  148. .blank 9
  149. .locate 14,1
  150. Notice that the bottom resistor is 1/3 of the total resistance,
  151. and (wait for it...)
  152. .wait 12
  153.  
  154.     the voltage at the junction is 1/3 of the total voltage.
  155. .wait 12
  156.  
  157. Also, the top resistor is twice as big as the bottom one,
  158. .wait 12
  159.  
  160.       and has twice as much  volt drop as the bottom one.
  161.  
  162. .pause(*Press any key to continue*)
  163. .rem**************************************************************
  164. .cls
  165. .screen 2
  166. Look at it like this:
  167. .get lh.img
  168. .put 120,112
  169. .get rv.img
  170. .put 126,88
  171. .get lv.img
  172. .put 126,80
  173. .get rv.img
  174. .put 126,56
  175. .get res-grow.img
  176. .put 126,54
  177. .play (*t200 mf o3 l8 c*)
  178. .put 126,52
  179. .play (*t200 mf o3 l8 c+*)
  180. .put 126,50
  181. .play (*t200 mf o3 l8 d*)
  182. .put 126,48
  183. .play (*t200 mf o3 l8 d+*)
  184. .put 126,46
  185. .play (*t200 mf o3 l8 e*)
  186. .put 126,44
  187. .play (*t200 mf o3 l8 f*)
  188. .put 126,42
  189. .play (*t200 mf o3 l8 f+*)
  190. .put 126,40
  191. .play (*t200 mf o3 l8 g*)
  192. .put 126,38
  193. .play (*t200 mf o3 l8 g+*)
  194. .put 126,36
  195. .play (*t200 mf o3 l8 a*)
  196. .put 126,34
  197. .play (*t200 mf o3 l8 a+*)
  198. .put 126,32
  199. .play (*t200 mf o3 l8 b*)
  200. .get lh.img
  201. .put 120,31
  202. .play (*t200 mf o4 l8 c*)
  203. .locate 3,15
  204. +12V
  205. .locate 13,13
  206. 5K
  207. .locate 7,12
  208. 10K
  209. .locate 7,21
  210. 8V
  211. .locate 13,21
  212. 4V
  213. .locate 16,17
  214. 0V
  215. .get up-arrow.img
  216. .put 162,31
  217. .put 162,85
  218. .get down-arr.img
  219. .put 162,76
  220. .put 162,105
  221. .get lv.img
  222. .put 162,39
  223. .put 162,68
  224. .put 162,60
  225. .locate 11,12
  226. +4V
  227. .wait 10
  228. .locate 5,30
  229. The idea is really very simple:
  230. .locate 7,30
  231. 1:  The bigger the resistor,
  232. .locate 8,30
  233.     the more volt-drop there is.
  234. .wait 12
  235. .locate 10,30
  236. 2:  All the volt-drops have to add up
  237. .locate 11,30
  238.     to equal the total supply.
  239. .locate 13,30
  240. .wait 12
  241. 3:  The output voltage is just
  242. .locate 14,30
  243.     the volt-drop across the bottom resistor.
  244. .locate 16,30
  245. (This assumes there's 0V
  246. .locate 17,30
  247. at the bottom of the divider chain.)
  248. .locate 22,1
  249. .wait 12
  250. Make sure you have taken that all in before you
  251. .locate 23,1
  252. .pause(*continue (press any key to do so)*)
  253. .locate 1,1
  254. .blank 1
  255. .locate 3,30
  256. ┌───────────────────────────────────────────────┐
  257. .locate 4,30
  258. │                                               │
  259. .locate 5,30
  260. │                                               │
  261. .locate 6,30
  262. │                                               │
  263. .locate 7,30
  264. │                                               │
  265. .locate 8,30
  266. │                                               │
  267. .locate 9,30
  268. │                                               │
  269. .locate 10,30
  270. │                                               │
  271. .locate 11,30
  272. │                                               │
  273. .locate 12,30
  274. │                                               │
  275. .locate 13,30
  276. │                                               │
  277. .locate 14,30
  278. │                                               │
  279. .locate 15,30
  280. │                                               │
  281. .locate 16,30
  282. │                                               │
  283. .locate 17,30
  284. └───────────────────────────────────────────────┘
  285. .locate 20,1
  286. .blank 4
  287. .locate 4,32
  288. So, to find the output of a potential divider
  289. .locate 7,32
  290. 1:  Calculate what proportion of the total
  291. .locate 8,32
  292.     resistance the bottom resistor is...
  293. .locate 10,32
  294.     (in this case it's 1/3rd)
  295. .wait 20
  296. .locate 13,32
  297. 2:  This also tells you what  proportion
  298. .locate 14,32
  299.     of the input voltage  will come out.
  300. .locate 16,32
  301.     (1/3rd of 12V is 4V.)
  302. .locate 23,1
  303. .pause(*Press any key to continue*)
  304. .locate 3,30
  305. ┌───────────────────────────────────────────────┐
  306. .locate 4,30
  307. │                                               │
  308. .locate 5,30
  309. │                                               │
  310. .locate 6,30
  311. │                                               │
  312. .locate 7,30
  313. │                                               │
  314. .locate 8,30
  315. │                                               │
  316. .locate 9,30
  317. │                                               │
  318. .locate 10,30
  319. │                                               │
  320. .locate 11,30
  321. │                                               │
  322. .locate 12,30
  323. │                                               │
  324. .locate 13,30
  325. │                                               │
  326. .locate 14,30
  327. │                                               │
  328. .locate 15,30
  329. │                                               │
  330. .locate 16,30
  331. │                                               │
  332. .locate 17,30
  333. └───────────────────────────────────────────────┘
  334. .locate 23,1
  335. .blank 1
  336. .locate 5,32
  337. If the resistor values are too difficult
  338. .locate 6,32
  339. for mental arithmetic,
  340. .locate 8,32
  341. use a calculator to get the proportion,
  342. .locate 9,32
  343. then multiply by the input voltage.
  344. .locate 11,32
  345. The proportion is, of course,
  346. .locate 13,32
  347.     (bottom resistance)        5K
  348. .locate 14,32
  349.     ───────────────────     eg ───  = 1/3rd
  350. .locate 15,32
  351.     (total  resistance)        15K
  352. .locate 23,1
  353. .pause(*Press any key to continue*)
  354. .locate 3,30
  355. ┌───────────────────────────────────────────────┐
  356. .locate 4,30
  357. │                                               │
  358. .locate 5,30
  359. │                                               │
  360. .locate 6,30
  361. │                                               │
  362. .locate 7,30
  363. │                                               │
  364. .locate 8,30
  365. │                                               │
  366. .locate 9,30
  367. │                                               │
  368. .locate 10,30
  369. │                                               │
  370. .locate 11,30
  371. │                                               │
  372. .locate 12,30
  373. │                                               │
  374. .locate 13,30
  375. │                                               │
  376. .locate 14,30
  377. │                                               │
  378. .locate 15,30
  379. │                                               │
  380. .locate 16,30
  381. │                                               │
  382. .locate 17,30
  383. └───────────────────────────────────────────────┘
  384. .locate 23,1
  385. .blank 1
  386. .locate 5,32
  387. To summarise,
  388. .locate 11,36
  389. output = input * ───────────────────
  390. .locate 10,36
  391.                  (bottom resistance)
  392. .locate 12,36
  393.                  (total  resistance)
  394. .wait 15
  395. .play(*t200 ml o1 l4 g l8 ab o2 cdef l2 g*)
  396.  
  397. .locate 20,1
  398. But remember to use common sense, and the idea of proportions
  399. to check that your answer looks right.
  400. .wait 5
  401. .play (*mn a l4 o1 b o2 l2 c*)
  402. .locate 23,1
  403. That completes the explanation part of this tutorial.
  404. .pause(*Press any key to return to the menu.*)
  405. @menu
  406.